package utils

import (
	"github.com/gin-gonic/gin"
)

func ResJson(c *gin.Context, code int, msg interface{}, data interface{}) {
	if data == nil {
		data = make([]int, 0)
	}
	c.JSON(code, gin.H{
		"code": code,
		"msg":  msg,
		"data": data,
	})
}
